<?php
/**
 * 内容模板詳情列表
 */
Route::get('operation/content_template_details', ['as' => 'operation.content_template_details.index', 'uses' => 'Operation\ContentTemplateDetailsController@index']);
Route::post('operation/content_template_details', ['as' => 'operation.content_template_details.store', 'uses' => 'Operation\ContentTemplateDetailsController@store']);
Route::get('operation/content_template_details/create', ['as' => 'operation.content_template_details.create', 'uses' => 'Operation\ContentTemplateDetailsController@create']);
Route::put('operation/content_template_details/{content_template_details}', ['as' => 'operation.content_template_details.update', 'uses' => 'Operation\ContentTemplateDetailsController@update']);
Route::patch('operation/content_template_details/{content_template_details}', ['as' => 'operation.content_template_details.update', 'uses' => 'Operation\ContentTemplateDetailsController@update']);
Route::delete('operation/content_template_details/{content_template_details}', ['as' => 'operation.content_template_details.destroy', 'uses' => 'Operation\ContentTemplateDetailsController@destroy']);
Route::get('operation/content_template_details/{content_template_details}', ['as' => 'operation.content_template_details.show', 'uses' => 'Operation\ContentTemplateDetailsController@show']);
Route::get('operation/content_template_details/{content_template_details}/edit', ['as' => 'operation.content_template_details.edit', 'uses' => 'Operation\ContentTemplateDetailsController@edit']);

/**
 * 内容模板详情列表, 上下线和发布
 */
// 相同区位模板检测是否有已发布的模板
Route::post('operation/content_template_details/is_published/view', [
    'as'   => 'operation.content_template_details.is_published',
    'uses' => 'Operation\ContentTemplateDetailsController@isPublished',
]);

// 单个上线发布
Route::post('operation/content_template_details/publish_one/view', [
    'as'   => 'operation.content_template_details.publish_one',
    'uses' => 'Operation\ContentTemplateDetailsController@publish',
]);

// 单个下线发布
Route::post('operation/content_template_details/publish_down_one/view', [
    'as'   => 'operation.content_template_details.publish_down_one',
    'uses' => 'Operation\ContentTemplateDetailsController@batchModerate',
]);

// 单个上线按钮
Route::post('operation/content_template_details/up/view', [
    'as'   => 'operation.content_template_details.up',
    'uses' => 'Operation\ContentTemplateDetailsController@batchModerate',
]);
// 单个下线按钮
Route::post('operation/content_template_details/down/view', [
    'as'   => 'operation.content_template_details.down',
    'uses' => 'Operation\ContentTemplateDetailsController@batchModerate',
]);
// 查询进度
Route::get('operation/content_template_details/publish_progress/view', [
    'as'   => 'operation.content_template_details.publish_progress',
    'uses' => 'Operation\ContentTemplateDetailsController@publishProgress',
]);


// 清除缓存
Route::get('operation/content_template_details/clear_cache/view', [
    'as'   => 'operation.content_template_details.clear_cache',
    'uses' => 'Operation\ContentTemplateDetailsController@clearCache',
]);

